home *** CD-ROM | disk | FTP | other *** search
/ HPAVC / HPAVC CD-ROM.iso / pc / DDPLUS71.ZIP / ELOG.ZIP / ELOG.DOC next >
Encoding:
Text File  |  1995-03-21  |  4.3 KB  |  94 lines

  1.                               ERROR LOG UNIT
  2.                               Copyright 1995
  3.                                    By
  4.                                 Bob Dalton
  5.  
  6.                                INTRODUCTION:
  7.                                ------------
  8.           One of the most frustrating things about being a door author
  9.           is having to deal with the people who send you a message
  10.           that the door program is not working but do NOT give me
  11.           sufficient information on WHY it is not working.  This unit
  12.           will help you by providing an error.log when the program
  13.           crashes or aborts for some reason.  Just ask your door users
  14.           to send you any error logs which might be generated by your
  15.           program.  This unit has helped me pin down, almost exactly
  16.           at times, some of the bugs which rear their ugly heads in my
  17.           doors on occassion.  The ELOG.PAS code included in this
  18.           archive is FREEWARE and can be used in any manner you want
  19.           and without cost, but remains copyrighted to Bob Dalton,
  20.           along with anything else in this package.
  21.  
  22.                                 REQUIREMENTS:
  23.                                 ------------
  24.           At this point in time the only requirements are that you must
  25.           be using Borland Turbo Pascal version 6.0 or 7.0.  I compiled
  26.           the unit with Borland Pascal 7.0 Professional and know it
  27.           works. I expect it will with TP 6.0 as well but can't guarantee
  28.           it. 
  29.  
  30.                                 Files Included
  31.                                 --------------
  32.           Below is a listing of all files for the ELOG.ZIP Package:
  33.  
  34.           ELOG.DOC     - The text file you are reading.
  35.           ELOG.PAS     - The Error Log routines unit by Bob Dalton.
  36.  
  37.                     Installation and Preparation for Use
  38.                     ------------------------------------
  39.  
  40.          1. Move the archive package to a temporary directory and "unzip".
  41.  
  42.          2. Before compiling the ELOG.pas unit be sure that your
  43.             compiler knows where to find the listed units.
  44.  
  45.          3. Add ELOG to the "Uses" portion of your program and call
  46.             the procedures as needed and shown below. Only two lines
  47.             in your main program code are required to make the unit
  48.             work with your program.
  49.  
  50.             SaveExitProc:=Exitproc;  <------ Must be first to make it work
  51.             ExitProc:=@MyExit1;      <------ Must be second to make it work
  52.  
  53.          4.  That's it!  Enjoy and good luck.
  54.  
  55.          5.  Replace "uses DDPlus" with "Use DDPlusR" if you are using
  56.              RipLink and also uncomment those portions of the ELOG.PAS unit
  57.              which pertain to RipLink.
  58.          
  59.          6.  Make sure you include you save game procedure call in the
  60.              places shown in the ELOG.PAS unit!
  61.              
  62.          7.  Still have questions?  The RipDoor demo program in the RIPLINK
  63.              portion of the DDplus package and the LDEMO demo program in
  64.              the LOCKING portion of the DDPlus package both have working
  65.              examples of the elog unit in action. Both also come with
  66.              source code you can look at to see how it was done.
  67.  
  68.   
  69.                          TO USE THE ELOG.PAS UNIT
  70.                          ------------------------
  71.  
  72.  FUNCTION FILE_EXISTS - Detects if a DOS file is present in the same 
  73.                       directory. Returns true if it is and false if it is
  74.                       not.
  75.  
  76.  PROCEDURE TERMINATE--|
  77.  PROCEDURE TRAPEXIT---| All three of these work together to trap an exit
  78.  PROCEDURE MYEXIT1----|  and redirect it so that an error.log is created
  79.                          that's can tell you what happened and why. Makes
  80.                          debugging a lot easier. Just make sure users send
  81.                          you the error.log when they report a problem.
  82.  
  83.  Here is a sample of the first several lines of my main program which shows
  84.  you how to make the ELOG unit work in YOUR program:
  85.  
  86.  BEGIN (***  M A I N  ***)
  87.   SaveExitProc:=Exitproc;  <------ Must have this first to make it work
  88.   ExitProc:=@MyExit1;      <------ Must have this second to make it work
  89.   GetDate(Year,Month,Day,DOW);
  90.   INITDOORDRIVER('GOC.CTL');
  91.   PROGNAME:='GODFATHER OF CRIME by Bob Dalton';
  92.  etc....
  93.  
  94.